import request from '@/utils/request'
import upload from '@/utils/upload'
// 查询点位类型列表
export function listLocationType(data) {
  return request({
    url: '/locationType/tree',
    method: 'post',
    data: data
  })
}

// 查询点位类型详细
export function getByIdLocationType(id) {
  return request({
    url: '/locationType/getById?id=' + id,
    method: 'get'
  })
}

// 新增或者修改点位类型
export function saveOrUpdateLocationType(data) {
  return request({
    url: '/location/appSaveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除点位类型
export function removeByIdLocationType(id) {
  return request({
    url: '/locationType/removeById?id=' + id,
    method: 'get'
  })
}

export function pageLocationType(data) {
  return request({
    url: '/locationType/page',
    method: 'post',
    data: data
  })
}
// 图片上传
export function uploadFile(data) {
  return upload({
  	url: '/common/upload',
  	method: 'post',
  	name: data.name,
  	filePath: data.filePath
  })
}
export function pageEnterprise(data) {
  return request({
    url: '/enterprise/page',
    method: 'post',
    data: data
  })
}
export function appLocPage() {
  return request({
    url: '/location/appLocPage',
    method: 'post',
  })
}
export function appPersonalLocPage(data) {
  return request({
    url: '/location/appPersonalLocPage',
    method: 'post',
    data: data
  })
}
